Currently, many digital imaging devices incorporate compression coding processing functions for still images. So-called digital cameras and the like are typical among these digital imaging devices. A digital color copying machine is one of the digital imaging devices incorporating compression coding processing functions.
In a digital color copying machine, the original reading unit incorporates a compression coding processing function for read original image data in order to reduce the amount of data transferred from the original reading unit to the printing unit when the read original image data is transferred. The printing unit incorporates a decompression/decoding processing function for compression-coded original image data.
The data amount of the coded original image data generated by the compression coding processing unit provided on the output stage of the original reading unit can be reduced to about one-severalth to one-ten-oddth of the data amount of the original image data before compression coding processing, i.e., the original image data that has only been read.
With regard to a reduction degree for the data amount of original image data before a coded original image data is compression-coded, i.e., an allowable compression ratio upper limit, a value at which it is not easy to visually recognize coding distortion from reconstructed image data obtained by decompression/decoding processing is set as an allowable upper limit.
An allowable lower limit of the above compression ratios is uniquely determined by various system parameters in the system, such as the maximum data amount of original image data that can be read by the original reading unit per unit time and the maximum data transfer amount of compression-coded original image data when they are transferred from the original reading unit to the printing unit.
Even if allowable compression ratio upper and lower limits are set in this manner, it is not easy to perform compression coding processing such that the compression ratios for all original image data supplied fall within that range. This is because even if compression coding processing is performed by using identical coding parameters represented by quantization tables, the data amounts of the resultant coded original image data vary depending on the original image data. In other words, read original image data vary in compression ratio for each original.
This is because every read original image data differs in deviation in terms of spatial frequency and its degree, and various techniques for minimizing the redundancy of compression-coded image data are used in compression coding processing for such original image data, including runlength coding for transform coefficients whose values are 0 and entropy coding using variable-length codes.
In order to perform compression coding processing such that compression ratios for all original image data fall within the range between the allowable upper limit and the allowable lower limit, coding parameters to be applied to the respective data to be compression-coded, i.e., the respective original image data to be supplied, must be adaptively changed.
To perform compression coding processing at a constant compression ratio, coding control called information amount control or code amount control must be implemented. Practical methods of implementing the above information amount control are roughly classified into two known methods: a feedforward method and feedback method.
In the feedforward method, before compression coding processing, a dynamic range, power, and various statistical information are calculated from original image data input as data to be compression-coded, and an optimal coding parameter is predicted on the basis of the calculated values. Thereafter, actual compression coding processing is performed by using the obtained coding parameter. In contrast to this, in the feedback method, after an optimal coding parameter is predicted from the actually measured coded data amount obtained by performing trial compression coding processing, final compression coding processing is performed by using the obtained coding parameter.
Of these methods, the feedback method of predicting an optimal coding parameter from the actually measured value of the coded data amount obtained by trial compression coding processing can obtain a predictive value of a coding parameter for the generation of a coded data amount with higher precision than in the feedforward method, because the feedback method directly uses an actually obtained coded data amount for the calculation of a predictive value. Theoretically, however, this feedback method takes more time overhead spent for trial compression coding processing.
In contrast to this, a trial algorithm can be repeatedly applied a finite number of times to a system which can tolerate an increase in processing time due to the repetition of compression coding processing for one original image data until a coded data is obtained at a target compression ratio, i.e., a system that is not required to have very high real-time operability and performance (e.g., Japanese Patent Publication No. 8-32037).
In general, however, a digital imaging device such as a digital camera or digital color copying machine is required to have high real-time operability and performance. It is therefore important for the device to minimize the time overhead spent for trial compression coding processing for the prediction of an optimal coding parameter. In addition, sufficiently high prediction precision is required for the device.
It is readily anticipated that the prediction precision of an optimal coding parameter in information amount control using the feedback method can be effectively improved by performing trial compression coding processing by using many different coding parameters a plural number of times and increasing the number of combinations of the coding parameters and the actually measured values of coded data amounts that are actually obtained.
In order to minimize the time overhead, this device needs to have arithmetic circuits or processing circuits equal in number to coding parameters used for trial compression coding processing, and some contrivance is required to, for example, perform trial compression coding processing at high speed by operating these circuits in parallel. Several techniques have been proposed to solve such a problem. As one of the techniques, a technique associated with parallel circuit architectures is known (e.g., “60 to 140 Mbps Compliant HDTV Codec” (Video Information, January 1992, p. 51 to 58).
According to the above reference, for example, an optimal coding parameter, i.e., an optimal quantization table, can be obtained by performing curve approximation on the basis of N coded data amounts obtained from a compression coding apparatus having N quantization circuits and N generated code amount measurement circuits by using N quantization tables as a plurality of coding parameters.
A technique of suppressing an increase in circuit size with a similar arrangement has also been proposed (for example, Japanese Patent No. 2523953). According to this reference, three quantization circuits are provided to concurrently perform quantizing operations using five quantization tables in trial compression coding processing, thereby calculating five coded data amount values.
Assume that one image data is to be compression-coded. In this case, in moving image compression coding using a coding scheme capable of sequentially proceeding with compression coding processing while adaptively changing a coding parameter, and more specifically, a scaling value for a quantization table, an algorithm for sequentially correcting a coding parameter in an image compression coding apparatus can be used (see, for example, Japanese Patent No. 2897563).
According to Japanese Patent No. 2897563, in trial compression coding processing, the data amount of coded data obtained by quantization using a specific quantization scaling value is calculated on a block basis. The data amount of M coded data which is expected to be obtained by using M quantization scale values is predicted on the basis of the calculated data amount. This apparatus proceeds with compression coding processing while sequentially correcting the actually used quantization scaling value on the basis of the difference between the target coded data amount calculated from the M predictive values and the cumulative value of the data amounts of coded data which have been actually output up to the current time point, i.e., a prediction error.
There is also disclosed a technique used in an electronic camera apparatus (see, for example, Japanese Patent No. 3038022) in which in order to prevent the amount of coded data that are actually generated from exceeding an allowable upper limit against prediction, when the data amount of coded data actually obtained by quantization and variable-length coding using the quantization step value derived from the coded data amount obtained in trial compression coding processing exceeds the data amount assigned on a block basis, the variable-length coding for the corresponding block is aborted (significant transform coefficient information is discarded).
The above conventional techniques in information amount control using the feedback method are common in that an optimal coding parameter and a coded data amount predictive value to be generated by the coding parameter are derived on the basis of one or a plurality of actually measured coded data amounts obtained by trial compression coding processing.
In the JPEG coding scheme currently widely used as a general still image compression coding scheme, only one combination of values in a quantization step value matrix, i.e., a quantization table, which is one of the most representative coding parameters is commonly applied to all the blocks constituting one data to be compression-coded.
Provided that a still image compression coding scheme like the one described above with a limitation being imposed on the degree of freedom of coding parameters is used, the above algorithm for sequentially correcting a coding parameter cannot be used in any of the above conventional techniques.
According to the above algorithm disclosed in Japanese Patent No. 3038022, when the data amount of a coded data exceeds a data amount assigned per block, the variable-length coding for the block is aborted. Even if, therefore, the data amount of the final coded data obtained upon completion of compression coding processing for all the blocks constituting image data does not exceed an allowable upper limit, even a significant transform coefficient that need not be discarded is discarded. As a consequence, local variations in compression coding distortion occur in a reconstructed image obtained by decompression/decoding processing, and hence it is not preferable to apply such compression coding processing to a digital imaging device.
According to the above description, when a still image compression coding scheme with a limitation being imposed on the degree of freedom of coding parameters, such as the JPEG coding scheme, is to be used for a digital imaging device, it is optimal that compression coding operations are simultaneously performed by using different coding parameters by increasing the number of parallel operations within an allowable circuit size range, and one of the resultant coded data which exhibits the least coding distortion within an allowable compression ratio range is output. However, as the number of parallel operations increases, the overhead in transferring and storing coded data in a memory through a transmission path increases, resulting in a deterioration in system performance.
There is also available a method of determining a new coding parameter at the time point a coded data exceeds a compression ratio range and redoing compression coding processing from the start of data to be coded instead of increasing the number of parallel operations. However, the time spent for this redoing, i.e., re-coding processing, directly leads to a deterioration in system performance.